<%@page import="javax.xml.ws.Response"%>
<%@page import="com.cho.manage.AbbsService"%>
<%@ page language="java" contentType="text/html; charset=EUC-KR" %>
<% request.setCharacterEncoding("euc-kr"); %>
<% response.setCharacterEncoding("euc-kr"); %>
<%@ page import = "com.cho.dto.BoardDTO"  %>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=EUC-KR">
<title>Insert title here</title>
</head>


<%
	String command = request.getParameter("command");
	if(command == null){
		//
		
	}
%>

<body>
<%
	if(command.equalsIgnoreCase("insertBoard")){
		String uname = request.getParameter("uname");
		String password = request.getParameter("password");
		String title = request.getParameter("title");
		String content = request.getParameter("content");
		
		AbbsService service = AbbsService.getIntance();
		BoardDTO dto = new BoardDTO(uname, password, title, content);
		boolean isCheck = service.insertBoard(dto);
		if(isCheck){
			response.sendRedirect("boardControl.jsp?command=boardList");
		}else{
			//response.sendRedirect("boardControl.jsp?command=boardList");
		}
		
		
	}else if (command.equalsIgnoreCase("getBoard")){
		
		
	}else if (command.equalsIgnoreCase("getAllBoard")){
		
	}

%>
	
	
</body>
</html>